package io.github.xxyopen.novel.dao.entity;

import java.util.Objects;

public class StuTeacher {
    private long id;         // 主键id
    private long stuId;      // 学生id
    private long teacherId;  // 教师id

    private Integer value;

    // 无参构造函数

    public StuTeacher() {
    }
    // 带参构造函数

    public StuTeacher(long id, long stuId, long teacherId) {
        this.id = id;
        this.stuId = stuId;
        this.teacherId = teacherId;
    }
    // Getter 和 Setter 方法

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    public long getStuId() {
        return stuId;
    }

    public void setStuId(long stuId) {
        this.stuId = stuId;
    }

    public long getTeacherId() {
        return teacherId;
    }

    public void setTeacherId(long teacherId) {
        this.teacherId = teacherId;
    }

    // toString 方法（可选，方便打印调试）
    @Override
    public String toString() {
        return "BizStuTeacher{" +
                "id=" + id +
                ", stuId=" + stuId +
                ", teacherId=" + teacherId +
                '}';
    }

    // hashCode 和 equals 方法（可选，用于集合比较）
    @Override
    public int hashCode() {
        return Objects.hash(id, stuId, teacherId);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        StuTeacher that = (StuTeacher) o;
        return id == that.id && stuId == that.stuId && teacherId == that.teacherId;
    }
}
